cody - HTMLify profile

cody
4270 Files
633435 Views
Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/186 - Picture in Picture
@import url("https://fonts.googleapis.com/css?family=Barlow&display=swap");
html {
box-sizing: border-box;
}
body {
margin: 0;
html {
box-sizing: border-box;
}
body {
margin: 0;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Picture in Picture</title>
<link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="style.css">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Picture in Picture</title>
<link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="style.css">
const videoElement = document.getElementById('video');
const button = document.getElementById('button');
// Prompt to select media stream, pass to video element, then play
async function selectMediaStream() {
try {
const mediaStream = await navigator.mediaDevices.getDisplayMedia();
videoElement.srcObject = mediaStream;
const button = document.getElementById('button');
// Prompt to select media stream, pass to video element, then play
async function selectMediaStream() {
try {
const mediaStream = await navigator.mediaDevices.getDisplayMedia();
videoElement.srcObject = mediaStream;